<!doctype html>
<html>
<head>
    <include file="public/head"/>
    <title>插件钉钉首页</title>
    <meta name="description" content="插件钉钉首页">
    <meta name="keywords" content="插件钉钉首页">
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:cmf_plugin_url('dingding://AdminSense/index')}">钉钉场景后台</a></li>
        <li class="active"><a>设置场景字段</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" action="{:cmf_plugin_url('dingding://AdminSense/fieldsettingPost')}" method="post">
        <div class="form-group">
            <label class="col-sm-2 control-label">列表字段</label>
            <div class="col-md-6 col-sm-10">
                <foreach name="fields" item="vo">
                    <php>if(empty($sense['listfield']))$checked = ""; else $checked=in_array($vo,$sense['listfield'])?"checked":"";</php>
                    <label><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="listfield[]"
                           value="{$vo}" title="{$vo}" {$checked}> {$vo}</label>
                </foreach>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">导出EXCEL字段</label>
            <div class="col-md-6 col-sm-10">
                <foreach name="fields" item="vo">
                    <php>if(empty($sense['excelfield']))$checked = ""; else $checked=in_array($vo,$sense['excelfield'])?"checked":"";</php>
                    <label><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="excelfield[]"
                           value="{$vo}" title="{$vo}" {$checked}>{$vo}</label>
                </foreach>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-2 control-label">作为图片目录字段</label>
            <div class="col-md-6 col-sm-10">
                <foreach name="fields" item="vo">
                    <php>$checked= ($vo == $sense['downdir'])?"checked":"";</php>
                    <label><input type="radio" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="downdir"
                           value="{$vo}" title="{$vo}" {$checked}>{$vo}</label>
                </foreach>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">导出图片字段</label>
            <div class="col-md-6 col-sm-10">
                <foreach name="fields" item="vo">
                    <php>if(empty($sense['downfield']))$checked = ""; else $checked=in_array($vo,$sense['downfield'])?"checked":"";</php>
                    <label><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="downfield[]"
                           value="{$vo}" title="{$vo}" {$checked}>{$vo}</label>
                </foreach>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$sense.id}"/>
                <input type="hidden" name="corp" value="{$sense.corp}"/>
                <input type="hidden" name="app" value="{$sense.app}"/>
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="{:cmf_plugin_url('dingding://AdminSense/index',['corp'=>$sense['corp'],'app'=>$sense['app']])}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>